<div class="SipeiInfo pt20">
<?php $form=$this->beginWidget('CActiveForm', array('id'=>'myform','method' => 'POST','htmlOptions'=>array('target'=>'ajax-frame'))); ?>
<table class="fontc_666 height32">
    <tbody>
        <tr height="55">
            <td valign="top" width="145" align="right" class="pr5"><span class="pr5 fontc_orange_red">*</span>考试项目：</td>
            <td valign="top" width="350" class="formValidator_td">            
                <span class="fl standard_select pt5 pr7 pb5 pl3 border_c border_3">
                    <span class="fl select_shelter">
                        <select class="fl fontc_666" name="exam_id" id="exam_id">
                            <option value="">考试项目</option>
                            <?php if (!empty($examArray)): ?>
                                <?php foreach ($examArray as $eVal): ?>
                                <option value="<?php echo $eVal['exam_id']; ?>" <?php if($eVal['exam_id'] == $data['exam_id']): ?>selected<?php endif; ?>><?php echo $eVal['exam_term_name']; ?></option>
                                <?php endforeach; ?>
                            <?php endif; ?>
                        </select>
                    </span>
                </span>
                <div class="formValidator_tip">
                    <p id="exam_idTip" ></p>
                </div>
            </td>
        </tr>
        <tr>
            <td align="right" class="pr5 pb20"><span class="pr5 fontc_orange_red">*</span>列别：</td>
            <td valign="top" class="pb20">
                <span class="fl standard_select pt5 pr7 pb5 pl3 border_c border_3">
                    <span class="fl select_shelter">
                        <select class="fl fontc_666" name="type">
                            <option value="1" <?php if($data['disciplin_type']==1): ?>selected<?php endif; ?>>理科</option>
                            <option value="2" <?php if($data['disciplin_type']==2): ?>selected<?php endif; ?>>文科</option>
                        </select>
                    </span>
                </span>
            </td>
        </tr>
        <tr height="55">
            <td valign="top" align="right" class="pr5"><span class="pr5 fontc_orange_red">*</span>本一线：</td>
            <td valign="top">
                <input type="text" value="<?php echo $data['score_type1']; ?>" name="stype1" id="stype1" class="col3 pt5 pr10 pb5 pl10 height20 border_c border_3 fontc_666">
            	<div class="formValidator_tip">
                    <p id="stype1Tip" ></p>
                </div>
            </td>
        </tr>
        <tr height="55">
            <td align="right" valign="top" class="pr5"><span class="pr5 fontc_orange_red">*</span>本二线：</td>
            <td valign="top">
                <input type="text" value="<?php echo $data['score_type2']; ?>" name="stype2" id="stype2" class="col3 pt5 pr10 pb5 pl10 height20 border_c border_3 fontc_666">
            	<div class="formValidator_tip">
                    <p id="stype1Tip" ></p>
                </div>
            </td>
        </tr>
        <tr height="55">
            <td align="right" valign="top" class="pr5"><span class="pr5 fontc_orange_red">*</span>统计高分段下线：</td>
            <td valign="top">
                <input type="text" value="<?php echo $data['score_type3']; ?>" name="stype3" id="stype3" class="col3 pt5 pr10 pb5 pl10 height20 border_c border_3 fontc_666">
            	<div class="formValidator_tip">
                    <p id="stype1Tip" ></p>
                </div>
            </td>
        </tr>
        <tr>
            <td align="right" class="pr2 pb20"></td>
            <td class="pb20">
                <input type="hidden" name="sid" value="<?php echo $sid; ?>"/>               
                <input type="submit" value="保存" class="cursor b_a_n border_3 back_bgfb w80 height32 fontc_FFF fonts_12 mr10">
                <input type="button" value="取消" onClick="api.close()" class="cursor b_a_n border_3 back_bgb w80 height32 fontc_FFF fonts_12">
            </td>
        </tr>
    </tbody>
</table>
</div>
<?php $this->endWidget(); ?>
<iframe src='' style="display:none" name='ajax-frame'></iframe>
<script>
$(function(){
	$.formValidator.initConfig({formID:"myform",theme:"126",submitOnce:false,
        onError:function(msg,obj,errorlist){
                $("#errorlist").empty();
                $.map(errorlist,function(msg){
                        $("#errorlist").append("<li>" + msg + "</li>")
                });
                alert(msg);
        },
        ajaxPrompt : '有数据正在异步验证，请稍等...'
	});

	/*分数段规则验证*/
	$("#exam_id").formValidator({
		onShowText:"",
		onShow:"",
		onFocus:"",
		onCorrect:"选择正确"
	}).inputValidator({
		min:1,
		onError:"请选择考试项目"
	});

	/*本一线验证*/
	$("#stype1").formValidator({
		onShowText:"请输入本一线分数",
		onShow:"",
		onFocus:"",
		onCorrect:"输入正确",
		leftTrim:true,
		rightTrim:true
	}).inputValidator({
		min:1,
		max:3,
		onError:"本一线分数不能为空且最长为4位"
	}).regexValidator({
		regExp:"num",
		dataType:"enum",
		onError:"分数格式不正确"
	});

	/*本二线验证*/
	$("#stype2").formValidator({
		onShowText:"请输入本二线分数",
		onShow:"",
		onFocus:"",
		onCorrect:"输入正确",
		leftTrim:true,
		rightTrim:true
	}).inputValidator({
		min:1,
		max:4,
		onError:"本二线分数不能为空且最长为4位"
	}).regexValidator({
		regExp:"num",
		dataType:"enum",
		onError:"分数格式不正确"
	});

	/*统计高分段下线验证*/
	$("#stype3").formValidator({
		onShowText:"请输入统计高分段下线",
		onShow:"",
		onFocus:"",
		onCorrect:"输入正确",
		leftTrim:true,
		rightTrim:true
	}).inputValidator({
		min:1,
		max:4,
		onError:"统计高分段下线分数不能为空且最长位4位"
	}).regexValidator({
		regExp:"num",
		dataType:"enum",
		onError:"分数格式不正确"
	});
	
})
</script>
<?php exit; ?>